/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package etherblocks.mods.shooter;

import com.jme3.network.serializing.Serializer;
import etherblocks.engine.network.*;
import etherblocks.mods.*;
import etherblocks.mods.shooter.entitysystem.components.*;
import etherblocks.mods.shooter.entitysystem.systems.*;
import etherblocks.mods.shooter.gui.*;
import etherblocks.mods.shooter.messages.*;
import etherblocks.mods.shooter.states.*;
import etherblocks.texturepacks.packs.*;

/**
 *
 * @author Carl
 */
public class ShooterMod extends Mod{

    public ShooterMod(){
        super("Ethershooter");
        properties.setValue("isBlockTerrainEditable", false);
        properties.setValue("isItemBarVisible", false);
        properties.setValue("isCameraChangable", false);
        properties.setValue("isRespawnAllowed", false);
    }
    static{
        Serializer.registerClasses(
            //Messages
            Message_EntityShot.class,
            Message_SpawnCommand.class,
            //Components
            HealthComponent.class,
            RandomMoveDirectionComponent.class,
            ShootableComponent.class,
            ShotComponent.class
        );
    }

    @Override
    public void onGameStarted(){
        super.onGameStarted();
        setTexturePack(new GhostTexturePack());
        addNifty("Interface/mods/shooter/IngameMenu.xml");
        addEntitySystem(new ZombieCounterSystem(getScreenController(ScreenController_IngameMenu.class)));
        addAppState(new WeaponAppState());
        addAppState(new ShooterPlayerAppState());
    }

    @Override
    public GameServer createGameServer(){
        return new ShooterGameServer();
    }
}
